<%--

  Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the latest version of the GNU Lesser General
  Public License as published by the Free Software Foundation;

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program (LICENSE.txt); if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

--%>
<%@ page errorPage="/WEB-INF/jsp/error.jsp"
    contentType="text/html; charset=utf-8"
%>
<%@ page import="org.jamwiki.model.*,org.jamwiki.utils.*" %>
<%
   String type = request.getParameter("type"); 
%>
<%@ include file="page-init.jsp" %>
<%@ include file="include.jsp" %>
<div align="left">

      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="36" align="left" valign="bottom" background="<%=imagePath %>right-bg.gif">
       <table width="98%" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td width="0" class="word-orange">&nbsp;</td>
             <td width="98%" align="left" class="word-orange">您所在位置：
             <!--
             <a href="/jamwiki" class="txt-blue"  target='_self' style="color:#e27e1b; ">Wiki首页 </a> &gt; 
             -->
             <a href="en/Special:Allpages" class="txt-blue"  target='_self' style="color:#e27e1b; ">分类列表</a>
           </tr>  
        </table>
         </td>
     </tr>
     </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td align="center"><img src="<%=imagePath %>right-line.gif" width="98%" height="9" /></td>
       </tr>
     </table>
     <table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td></td>
       </tr>
     </table>
     <form name="searchForm" method="post" action="<jamwiki:link value="Special:Search" />">
     <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td width="25%" align="left">搜索：
           <label>
           <input name="text" type="text" class="input" />
           &nbsp;<input type="image" src="<%=imagePath %>ico-search.gif" width="17" height="17" align="absmiddle" name="search" value='<f:message key="generalmenu.search"/>'/></label></td>
         <td width="50%" align="right"><a href="<%=basePath %>en/Special:Allpages?type=public&num=<%=WikiUtil.percount %>&offset=0"   class="<%if("public".equals(type)){ %>txt-blue<%}else{ %><%} %>"><strong>已发布主题</strong></a>&nbsp;  |  &nbsp;<a href="<%=basePath %>en/Special:Allpages?type=nonpublic&num=<%=WikiUtil.percount %>&offset=0" class="<%if("nonpublic".equals(type)){ %>txt-blue<%}else{ %><%} %>">未发布主题</a></td>
       </tr>
     </table>
     </form>
     <table width="98%" align="center"  border="0"  cellpadding="0" cellspacing="1" bgcolor="#dddddd" >
       <tr><td>
          <c:if test="${!empty notopic}">
			<div class="message"><f:message key="topic.notcreated"><f:param value="${notopic}" /><f:param><jamwiki:link value="${notopic}" text="${notopic}" /></f:param></f:message></div>
		  </c:if>
       </td></tr>
        <tr >
            <td width="5%" height="25" align="center"  class="table-title">序号</td>
            <td width="30%" align="center"  class="table-title">主题</td>
            <td width="65%" align="center"  class="table-title">摘要</td>
          </tr>
       <% String size =(String)session.getAttribute("searchresultsize");
          int i = 1;
       %>
       <c:forEach items="${results}" var="result">
       <tr   class="<%if(i%2==0){ %>table-tr1<%}else{ %>table-tr2<%} %>">
         <td align="center" height="10"><% out.print(i++); %></td>
         <td>	     
			<a href="/jamwiki/en/${result.topic}"><c:out value="${result.simpleTile}" escapeXml="false" /></a>	
		</td>
		<td>
		   &nbsp;<c:out value="${result.summary}" escapeXml="false" />
		</td>
       </tr>
       </c:forEach>
        <c:if test="${empty results}">
         <tr class="table-tr1"><td colspan="3">
			<div class="message"><f:message key="searchresult.notfound"><f:param value="${searchField}" /></f:message></div>
			<div class="message"><f:message key="topic.notcreated"><f:param value="${searchField}" /><f:param><jamwiki:link value="${searchField}" text="${searchField}" /></f:param></f:message></div>
	       </td></tr>
	    </c:if>
     </table>
    
<!-- 
<font size="-1"><i><f:message key="search.poweredby" /></i></font>
<a href="http://lucene.apache.org/java/"><img src="../images/lucene_green_100.gif" alt="Lucene" border="0" /></a>
 -->
